{% extends 'base.html' %}

{% block content%}

<table class="tabl">
<tr>
    {% if user.is_superuser %}
        <td colspan="2" class="heador"><strong>Список тренингов</strong></td>
        <td width="5%">
            <a href="{% url trainings_create argument %}"><img src="{{ MEDIA_URL }}images/add.png"></a>
        </td>
    {% else %}
        <td colspan="3" class="heador"><strong>Список тренингов</strong></td>
    {% endif %}
</tr>
{% for item in object_list %}
    <tr class="{% cycle 'color1' 'color2' %}">
        <td class="two" style="width:20%;">
            <a href="{{ item.get_absolute_url }}">{{item.date}}</a>
        </td>
        <td class="two" style="width:75%;">{{item.title}}</td>
        <td class="one" style="width:5%;"><a href="{% url trainings_update argument item.id %}" title="Редактировать троенинг от {{item.date}}"><img src="{{ MEDIA_URL }}images/edt.png"></a></td>
    </tr>
{% endfor %}
</table>
{% endblock %}